// ============================================================================
//
// Graph framework by Aurelien Moreau aurelien.moreau@gmail.com
// Modified by Pierre CHATEL chatelp@gmail.com
// Distributed under LGPL
// Copyright (C) Aurelien Moreau, 2008, 2009. All rights reserved
//
// ============================================================================

package com.thalesgroup.graphFramework.core.impl;

import com.thalesgroup.graphFramework.core.Edge;

public class EdgeImpl<V, E> extends GraphObjectImpl<V, E> implements Edge<V, E> {

	final protected VertexImpl<V, E> src;

	final protected VertexImpl<V, E> tgt;

	final protected E edge;

	public EdgeImpl(final GraphImpl<V, E> graph, int index, final VertexImpl<V, E> src,
			final VertexImpl<V, E> tgt, final E data) {
		super(graph, index);
		this.src = src;
		this.tgt = tgt;
		this.edge = data;
	}

	public E getEdge() {
		return edge;
	}

	public VertexImpl<V, E> getIn() {
		return src;
	}

	public VertexImpl<V, E> getOut() {
		return tgt;
	}
}
